package org.spring.springboot.app.mail.mailBind.service;

import org.spring.springboot.app.base.R;
import org.spring.springboot.app.mail.mailBind.domain.vo.MailSendBindVO;
import org.spring.springboot.app.mail.mailBind.domain.vo.ValidMailBindVO;
import org.spring.springboot.app.mail.mailBind.domain.vo.modifyMailBindingReqVO;

import javax.mail.internet.MimeMessage;

/**
 * 城市业务逻辑接口类
 * <p>
 * Created by bysocket on 07/02/2017.
 */
public interface ISysuBindingService {


    /**
     * accout：发送人账号
     *password：发送人密码
     * mailtheme: 邮件主题
     * html:邮件内容(发送html)
     * Addressee：收件人
     */
    MimeMessage createEmail(final String accout, final String password, String mailtheme, String html, String Addressee) throws Exception;
    /**
     * 邮箱发送方法
     * mailtheme: 邮件主题
     * html:邮件内容(发送html)
     * Addressee：收件人
     */
    void mainEmail(String mailtheme, String html, String Addressee) throws Exception;

    /**
     * 设置用户邮箱
     * @param id
     * @return
     */
    int setBinding(String id, String email);

    R modifyBinding(modifyMailBindingReqVO modifyMailBindingReqVO);

    R<MailSendBindVO> sendMail(MailSendBindVO mailsendBindVO);

    R validMailCode(ValidMailBindVO vo);




}
